From: Benjamin Otte Date: Sat, 8 Feb 2020 02:32:21 +0000 (+0100) Subject: tests: Use per-screen CSS providers X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~188^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=ed83272f35e77c0aeeb863c07a671e228e02c773;p=gtk4.git tests: Use per-screen CSS providers --- diff --git a/tests/animated-revealing.c b/tests/animated-revealing.c index 040e2c3e34..5e5f666a53 100644 --- a/tests/animated-revealing.c +++ b/tests/animated-revealing.c @@ -67,15 +67,15 @@ main(int argc, char **argv) cssprovider = gtk_css_provider_new (); gtk_css_provider_load_from_data (cssprovider, "* { padding: 2px; text-shadow: 5px 5px 2px grey; }", -1); + gtk_style_context_add_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (cssprovider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); for (x = 0; x < 10; x++) { for (y = 0; y < 20; y++) { widget = gtk_label_new ("Hello World"); - gtk_style_context_add_provider (gtk_widget_get_style_context (widget), - GTK_STYLE_PROVIDER (cssprovider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_grid_attach (GTK_GRID (grid), widget, x, y, 1, 1); } }